package day0109;

import java.util.Scanner;

public class Test9 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        System.out.println("请输入身高");
        double height = sc.nextDouble();
        System.out.println("请输入体重");
        double weight = sc.nextDouble();
        String rs=bmi(height, weight);
        System.out.println(rs);
    }
    static String bmi(double height, double weight){
        //2.计算
        double bmi=weight/(height*height);
        //3.判断：  0----18.5偏瘦   18.5----24正常   24以上----偏胖    否则----输入有误
        if(0<bmi  && bmi <18.5){
            return "偏瘦";
        }else if(18.5<=bmi  && bmi <=24){
            return "身材完美";
        }else if(24<bmi ){
            return "偏胖";
        }else{
            return "输入有误";
        }
    }
}
